/**
 * @作者 Luke
 * @微信公号 欧诺的小书屋
 * @开源项目 $ http://7yue.pro
 * @免费专栏 $ http://course.7yue.pro
 * @我的课程 $ http://imooc.com/t/4294850
 * @创建时间 2020-6-23 20:19
 */
package io.github.talelin.latticy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.github.talelin.latticy.model.HomeworkItemDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HomeworkItemMapper extends BaseMapper<HomeworkItemDO> {

    /**
     * 根据homework_id 获取课程完成情况
     * @param homeworkId
     * @return
     */
    List<HomeworkItemDO> getDetail(@Param(value = "homeworkId") Long homeworkId);

    /**
     * 教师修改作业
     * @param id homework_item_id
     * @param status 作业状态
     * @return int
     */
    int correctionHomework(@Param(value = "id") Long id, 
                           @Param(value = "status") String status,
                           @Param(value = "score") Long score);

}
